% fname: routing_oddeven__sel_bufferlevel__topology_8x8__.m
% ./noxim -routing oddeven -sel bufferlevel -dimx 8 -dimy 8  -sim 10000 -warmup 2000 -size 8 8 -buffer 8 -hs 27 0.2 -hs 28 0.2 -hs 35 0.2 -hs 36 0.2 

function [max_pir, max_throughput, min_delay] = routing_oddeven__sel_bufferlevel__topology_8x8__(symbol)

data = [
%             pir      avg_delay     throughput      max_delay       rpackets         rflits
           0.0022        19.7231      0.0182797            203           1080           8628
           0.0022        17.7792      0.0179762            102           1132           9060
           0.0022        18.8931       0.017752            144           1085           8663
           0.0022        18.8877      0.0188877            168           1113           8915
           0.0022        18.2204      0.0182063            127           1148           9176
           0.0022        18.8676      0.0180403            171           1118           8948
           0.0022        19.8169      0.0182852            115           1169           9362
           0.0022        20.5703      0.0177077            147           1096           8783
           0.0022        19.6588      0.0185504            136           1149           9201
           0.0022        18.7657      0.0176865             98           1114           8914
           0.0022        19.2297      0.0181311            154           1106           8848
           0.0022        20.2555      0.0177344            149           1135           9080
           0.0022        20.6261      0.0186389            143           1174           9394
           0.0022        19.0952      0.0174958            119           1050           8398
           0.0022        19.5659      0.0179583            112           1131           9051
           0.0022        21.6883      0.0184816            183           1126           9019
           0.0022        18.1993      0.0181587            100           1144           9152
           0.0022         18.373      0.0176171             88           1110           8879
           0.0022        18.2659      0.0167664            101           1023           8182
           0.0022        19.6297      0.0183271             97           1099           8797
           0.0023         20.544      0.0197762            124           1226           9809
           0.0023        18.7101      0.0190258            117           1197           9589
           0.0023        19.0906      0.0183869            133           1159           9267
           0.0023        17.3004      0.0175273            139           1122           8974
           0.0023        26.1142      0.0187698            314           1182           9460
           0.0023        20.5778      0.0187621            164           1163           9306
           0.0023        19.9914      0.0182461            148           1168           9342
           0.0023        20.5632      0.0191926            152           1170           9366
           0.0023        18.3053      0.0187004             97           1176           9425
           0.0023        20.1615      0.0184067            151           1158           9277
           0.0023        19.8111      0.0180215            190           1154           9227
           0.0023        22.0076      0.0192117            155           1191           9529
           0.0023        19.2717      0.0180215            157           1152           9227
           0.0023        20.0548      0.0200854            107           1205           9641
           0.0023        20.3229      0.0187659            155           1183           9458
           0.0023        22.9804       0.018629            299           1175           9389
           0.0023        20.6199      0.0187129            159           1197           9581
           0.0023        19.5542       0.018291            117           1171           9365
           0.0023        18.9312      0.0190957            118           1221           9777
           0.0023        20.9836      0.0196895            134           1223           9766
           0.0024        22.3177      0.0196152            252           1256          10043
           0.0024        20.4853      0.0191492            177           1187           9498
           0.0024        20.2618      0.0190992            134           1203           9626
           0.0024        18.6485      0.0192143             78           1209           9684
           0.0024        21.5691      0.0196129            197           1216           9728
           0.0024        24.3017      0.0193965            408           1243           9931
           0.0024        19.9741      0.0199153            105           1235           9878
           0.0024        17.9436      0.0191426            107           1224           9801
           0.0024         19.925      0.0201836             94           1293          10334
           0.0024        21.2371       0.019381            149           1219           9768
           0.0024        19.1582      0.0192877             90           1214           9721
           0.0024        21.3627      0.0187871            184           1202           9619
           0.0024        22.8707      0.0184785            191           1183           9461
           0.0024        20.2105       0.019082            139           1221           9770
           0.0024        20.2054      0.0191794            120           1188           9513
           0.0024        20.1234      0.0190377            193           1199           9595
           0.0024        20.1588      0.0188008            105           1203           9626
           0.0024        19.8233      0.0197944            147           1228           9818
           0.0024        21.4336      0.0196387            123           1257          10055
           0.0024        20.1392      0.0194677            110           1207           9656
           0.0025        21.2246      0.0207097            111           1282          10272
           0.0025        23.4287      0.0208135            224           1311          10490
           0.0025        21.0767       0.019252            145           1213           9703
           0.0025        22.6017      0.0205893            109           1298          10377
           0.0025        23.9638      0.0214782            166           1353          10825
           0.0025        22.2608       0.020502            123           1269          10169
           0.0025        21.7185      0.0198262            138           1268          10151
           0.0025        21.5057      0.0204863            144           1313          10489
           0.0025        23.2152       0.020418            217           1306          10454
           0.0025         21.953      0.0192773            193           1233           9870
           0.0025        22.0227      0.0209611            130           1279          10229
           0.0025        21.0676      0.0206627            136           1302          10414
           0.0025        20.5346      0.0191836            125           1229           9822
           0.0025        22.8926      0.0213711            174           1369          10942
           0.0025        19.5049      0.0196411            231           1218           9742
           0.0025         22.452      0.0204798            239           1270          10158
           0.0025        23.7155      0.0199355            139           1276          10207
           0.0025        22.2102      0.0193242            177           1237           9894
           0.0025        21.4314      0.0210833            151           1326          10626
           0.0025        20.9888      0.0201613            139           1251          10000
           0.0026        24.5843       0.020869            252           1316          10518
           0.0026        22.5379      0.0202578            146           1294          10372
           0.0026        23.6961      0.0204762            191           1290          10320
           0.0026        22.9918       0.021746            143           1347          10786
           0.0026        27.2687      0.0212578            241           1362          10884
           0.0026        22.0468      0.0203574            193           1303          10423
           0.0026        25.2979      0.0218828            153           1400          11204
           0.0026         21.994      0.0213075            173           1343          10739
           0.0026        21.8347      0.0216895            140           1343          10758
           0.0026        21.9522      0.0206151            135           1298          10390
           0.0026        24.5217      0.0204707            228           1311          10481
           0.0026         26.887      0.0213353            267           1345          10753
           0.0026        24.3685      0.0203274            229           1281          10245
           0.0026        24.3515      0.0207401            169           1306          10453
           0.0026        22.5796      0.0214738            140           1332          10651
           0.0026        25.0658      0.0214464            219           1352          10809
           0.0026          22.87       0.021541            166           1377          11029
           0.0026        22.7184      0.0206602            145           1321          10578
           0.0026         23.237      0.0201621            217           1291          10323
           0.0026        26.2489      0.0211766            197           1334          10673
           0.0027         25.937       0.022582            194           1445          11562
           0.0027        22.5092      0.0211875            128           1357          10848
           0.0027        24.0268      0.0210313            203           1345          10768
           0.0027        23.2793      0.0217383            145           1389          11130
           0.0027        22.6238      0.0215078            173           1377          11012
           0.0027        26.1805      0.0230352            180           1474          11794
           0.0027        21.6461      0.0212773            123           1362          10894
           0.0027        22.8109      0.0213984            148           1370          10956
           0.0027        21.8204      0.0216035            185           1381          11061
           0.0027         24.795      0.0206465            196           1322          10571
           0.0027        25.5265      0.0223984            153           1434          11468
           0.0027        24.9887      0.0222246            282           1422          11379
           0.0027        21.2308      0.0207109            171           1326          10604
           0.0027        30.8501      0.0228262            394           1461          11687
           0.0027        21.5113      0.0207012            148           1324          10599
           0.0027        27.1334      0.0215566            266           1379          11037
           0.0027        22.1922       0.021291            229           1363          10901
           0.0027        24.6413      0.0218869            214           1380          11031
           0.0027        25.2321      0.0223145            341           1383          11068
           0.0027        22.7375      0.0209762            164           1322          10572
           0.0028        30.1072      0.0222183            319           1399          11198
           0.0028        26.8585      0.0227461            184           1456          11646
           0.0028        29.9101      0.0232996            334           1468          11743
           0.0028        23.0236      0.0211797            163           1355          10844
           0.0028        26.1623      0.0237917            263           1497          11991
           0.0028        27.4859      0.0216621            306           1385          11091
           0.0028        24.5754       0.022668            183           1453          11606
           0.0028        26.0564      0.0218789            203           1401          11202
           0.0028        32.2606      0.0235801            263           1508          12073
           0.0028        26.2529      0.0216687            211           1364          10921
           0.0028        21.7318      0.0223184            136           1428          11427
           0.0028         27.633      0.0233829            248           1474          11785
           0.0028        26.7065       0.022875            205           1441          11529
           0.0028        34.1073      0.0239782            489           1510          12085
           0.0028        27.9576      0.0228223            173           1461          11685
           0.0028        26.2846      0.0231389            491           1458          11662
           0.0028        31.4334      0.0236028            266           1463          11707
           0.0028        25.2669      0.0226875            178           1405          11253
           0.0028        26.5416      0.0229286            251           1444          11556
           0.0028        26.1086      0.0231532            163           1437          11484
           0.0029        27.8698      0.0229082            186           1467          11729
           0.0029         26.254      0.0233468            159           1449          11580
           0.0029        26.8095       0.024494            152           1543          12345
           0.0029        26.7969      0.0229922            184           1472          11772
           0.0029        25.4874      0.0226071            207           1424          11394
           0.0029        28.0602      0.0233906            301           1496          11976
           0.0029        31.1409      0.0234082            329           1497          11985
           0.0029        32.6123      0.0229087            275           1442          11546
           0.0029        24.9661      0.0230176            136           1474          11785
           0.0029        24.2159      0.0239008            186           1505          12046
           0.0029        26.7959      0.0249617            234           1548          12381
           0.0029          28.98      0.0234531            255           1503          12008
           0.0029        26.9351      0.0236016            206           1511          12084
           0.0029        27.0989      0.0229141            244           1466          11732
           0.0029        27.9234      0.0236151            310           1488          11902
           0.0029        25.7936      0.0239266            192           1507          12059
           0.0029        33.4887      0.0234043            280           1500          11983
           0.0029        30.9258      0.0238184            291           1523          12195
           0.0029         24.049      0.0226667            161           1428          11424
           0.0029         26.857      0.0236797            175           1517          12124
            0.003        33.4416      0.0247617            230           1583          12678
            0.003        28.8508      0.0243631            309           1535          12279
            0.003        34.7696      0.0248889            409           1567          12544
            0.003        31.1554      0.0247923            383           1538          12297
            0.003        32.4644      0.0252363            402           1615          12921
            0.003        30.6418      0.0236426            257           1513          12105
            0.003        31.4315         0.0255            406           1606          12852
            0.003        31.2164      0.0254508            182           1553          12420
            0.003        33.3756      0.0234121            480           1499          11987
            0.003        30.7493      0.0234883            520           1504          12026
            0.003         32.123      0.0237401            322           1496          11965
            0.003        33.0795      0.0243373            403           1534          12266
            0.003        28.2373      0.0237578            184           1521          12164
            0.003        28.6066      0.0237282            232           1492          11959
            0.003        31.0858       0.024625            261           1527          12214
            0.003         30.238      0.0245137            385           1567          12551
            0.003        31.1666      0.0239375            224           1531          12256
            0.003         27.216      0.0235879            175           1509          12077
            0.003        23.9688      0.0235508            183           1506          12058
            0.003        30.9457      0.0244258            258           1564          12506
           0.0031        37.6205       0.025416            481           1626          13013
           0.0031        40.0054      0.0258301            419           1654          13225
           0.0031        41.1906      0.0255762            586           1637          13095
           0.0031        29.9567       0.025625            302           1641          13120
           0.0031        34.7749      0.0243027            430           1555          12443
           0.0031         33.678      0.0248691            496           1593          12733
           0.0031        32.2869      0.0245723            253           1572          12581
           0.0031        40.8104      0.0256406            480           1640          13128
           0.0031        31.1813      0.0249004            375           1594          12749
           0.0031        31.8085      0.0250337            282           1577          12617
           0.0031        32.5783      0.0254405            244           1603          12822
           0.0031        41.1902      0.0251074            371           1609          12855
           0.0031        35.9963      0.0252012            772           1611          12903
           0.0031        36.7313      0.0248301            292           1589          12713
           0.0031        32.7598      0.0240176            414           1536          12297
           0.0031        31.2789      0.0252031            257           1610          12904
           0.0031        25.5108      0.0234266            201           1476          11807
           0.0031         35.071         0.0255            233           1633          13056
           0.0031        27.6412      0.0239306            218           1508          12061
           0.0031        40.0541      0.0258333            506           1628          13020
           0.0032        33.5052      0.0245575            444           1546          12377
           0.0032        29.3356      0.0251543            346           1612          12879
           0.0032        33.8848      0.0262969            350           1684          13464
           0.0032        45.8478      0.0268175            526           1689          13516
           0.0032        41.9724      0.0254434            604           1629          13027
           0.0032        41.3301      0.0260371            678           1666          13331
           0.0032        31.5403      0.0250508            361           1601          12826
           0.0032        43.3503      0.0255312            923           1633          13072
           0.0032        35.2487      0.0247578            371           1584          12676
           0.0032        34.0131      0.0250977            352           1604          12850
           0.0032        32.4258      0.0251641            325           1611          12884
           0.0032        35.3406      0.0251719            253           1612          12888
           0.0032        37.7194      0.0259603            446           1636          13084
           0.0032        37.7551      0.0261055            436           1670          13366
           0.0032        32.3982      0.0258496            578           1655          13235
           0.0032        49.3474      0.0259961            609           1664          13310
           0.0032        30.2124      0.0248555            288           1591          12726
           0.0032        37.6827      0.0259531            501           1661          13288
           0.0032        35.0736      0.0259187            461           1631          13063
           0.0032        33.6901      0.0246289            277           1578          12610
           0.0033        39.4758      0.0258437            444           1656          13232
           0.0033        37.0962      0.0267242            683           1684          13469
           0.0033        44.6077      0.0270449            503           1731          13847
           0.0033        39.4484      0.0266348            562           1704          13637
           0.0033        38.4217      0.0262285            359           1679          13429
           0.0033        32.0287      0.0261973            283           1674          13413
           0.0033         30.406      0.0270377            213           1702          13627
           0.0033        44.9319      0.0263809            501           1689          13507
           0.0033        39.1905      0.0264141            340           1690          13524
           0.0033        28.8724      0.0252148            217           1614          12910
           0.0033        42.9568      0.0267832            526           1714          13713
           0.0033        33.3199      0.0255801            360           1635          13097
           0.0033          43.82      0.0270215            588           1728          13835
           0.0033        37.9783      0.0265937            510           1702          13616
           0.0033        39.6788      0.0262202            369           1653          13215
           0.0033        42.2562      0.0263115            395           1659          13261
           0.0033        35.1577      0.0257891            296           1649          13204
           0.0033        38.6398      0.0271766            546           1713          13697
           0.0033         57.072      0.0275476            798           1735          13884
           0.0033        44.5027       0.026619            477           1677          13416
           0.0034        66.9528      0.0265059           1221           1695          13571
           0.0034        47.8768      0.0276328            490           1769          14148
           0.0034        84.3735      0.0289082           1198           1850          14801
           0.0034        50.1912      0.0266426            635           1705          13641
           0.0034        44.8234      0.0261953            974           1676          13412
           0.0034         42.046      0.0271836            448           1739          13918
           0.0034        49.3845      0.0271719            588           1740          13912
           0.0034        29.6683      0.0255195            205           1634          13066
           0.0034        46.9822      0.0263535            659           1687          13493
           0.0034        52.4634      0.0271289            843           1735          13890
           0.0034        39.6708      0.0266484            434           1704          13644
           0.0034          53.28      0.0280156            567           1793          14344
           0.0034        53.6657      0.0273223           1230           1750          13989
           0.0034        65.6834      0.0277363            950           1775          14201
           0.0034        45.1823       0.027416            592           1755          14037
           0.0034        45.5713      0.0277266            859           1773          14196
           0.0034        62.7446      0.0282715            921           1809          14475
           0.0034         41.901      0.0268105            632           1717          13727
           0.0034        91.4542      0.0276289           1772           1768          14146
           0.0034        40.0331      0.0269102            581           1722          13778
           0.0035        72.3615      0.0271836           1187           1740          13918
           0.0035         47.674       0.027793            772           1779          14230
           0.0035        46.2342      0.0270391            534           1729          13844
           0.0035        99.6714      0.0290675           1721           1832          14650
           0.0035         52.183      0.0273203            679           1749          13988
           0.0035        56.9978      0.0281719            644           1804          14424
           0.0035        65.1629       0.028377           1616           1817          14529
           0.0035        73.2895      0.0274141            894           1755          14036
           0.0035        50.1645      0.0278438            512           1781          14256
           0.0035        52.8639      0.0275337            480           1734          13877
           0.0035        86.7044      0.0281563           1769           1803          14416
           0.0035        97.3073      0.0282051           1511           1803          14441
           0.0035        39.3291      0.0270684            483           1732          13859
           0.0035        41.5943      0.0272734            450           1745          13964
           0.0035        44.1312      0.0279512            354           1791          14311
           0.0035        66.6243      0.0278984           1248           1786          14284
           0.0035        58.8701      0.0283965            750           1817          14539
           0.0035        44.3447      0.0269004            453           1723          13773
           0.0035        65.9758      0.0275853            873           1738          13903
           0.0035        49.8366       0.028629            637           1805          14429
           0.0036        183.427      0.0295996           3109           1894          15155
           0.0036        76.2388      0.0291602           1312           1868          14930
           0.0036        64.9387      0.0290605            762           1861          14879
           0.0036         52.577      0.0292324            467           1870          14967
           0.0036        62.5035      0.0287129            889           1839          14701
           0.0036        62.8896       0.029125            902           1866          14912
           0.0036        83.2517      0.0290957           1006           1863          14897
           0.0036        57.6776      0.0276016            696           1765          14132
           0.0036        51.2508      0.0282163            611           1778          14221
           0.0036        64.6616      0.0285566            859           1826          14621
           0.0036         57.076      0.0288027            873           1842          14747
           0.0036        74.9775      0.0292188           1816           1870          14960
           0.0036        51.3652      0.0281367            561           1799          14406
           0.0036        63.1978      0.0285293           1022           1825          14607
           0.0036        51.7531      0.0286504            505           1835          14669
           0.0036        55.4675      0.0288613           1128           1848          14777
           0.0036        73.6237      0.0287227           1157           1839          14706
           0.0036        119.045      0.0300254           1801           1921          15373
           0.0036        86.1321      0.0282539           1510           1809          14466
           0.0036        46.3144       0.027752            669           1778          14209
           0.0037         70.368      0.0291484            686           1864          14924
           0.0037        97.0934      0.0302754           1034           1938          15501
           0.0037        93.1053      0.0300098           1374           1918          15365
           0.0037        103.645      0.0297598           1645           1903          15237
           0.0037        97.5677       0.030375           1339           1943          15552
           0.0037        113.206      0.0302949           1902           1940          15511
           0.0037        112.756      0.0292813           1609           1875          14992
           0.0037        84.6703      0.0285996           1000           1829          14643
           0.0037        54.6003      0.0293008            613           1874          15002
           0.0037        56.6883      0.0296602            620           1899          15186
           0.0037        72.4434      0.0295664           1180           1892          15138
           0.0037        62.3728      0.0292754            715           1875          14989
           0.0037        96.5346      0.0305323           1558           1893          15144
           0.0037        59.7544      0.0290645            795           1861          14881
           0.0037        143.644      0.0300317           2361           1893          15136
           0.0037        81.0077      0.0283945            984           1819          14538
           0.0037         78.058      0.0302031           1042           1931          15464
           0.0037        108.161      0.0296641           1600           1899          15188
           0.0037        123.334      0.0293691           1945           1880          15037
           0.0037        66.1582      0.0302798           1013           1909          15261
           0.0038        108.084      0.0295566           1784           1892          15133
           0.0038        119.032      0.0312004           1391           1965          15725
           0.0038        113.371      0.0299102           1692           1913          15314
           0.0038        138.163      0.0307539           4176           1969          15746
           0.0038        50.9557      0.0289102           1270           1852          14802
           0.0038        148.286      0.0312773           4279           2001          16014
           0.0038        90.7464      0.0304023           1150           1944          15566
           0.0038        87.0993      0.0296074           1062           1894          15159
           0.0038         77.991      0.0311035            810           1990          15925
           0.0038        144.214      0.0304062           2505           1947          15568
           0.0038        156.218      0.0310195           2769           1985          15882
           0.0038        126.501      0.0301992           4232           1931          15462
           0.0038        86.5393      0.0300137           1126           1919          15367
           0.0038        100.267      0.0303535           1251           1943          15541
           0.0038        90.0067       0.030207           1546           1933          15466
           0.0038        76.0833      0.0296035           1001           1896          15157
           0.0038        94.6555      0.0298652           1635           1913          15291
           0.0038        138.058      0.0307324           2041           1967          15735
           0.0038        129.595      0.0307324           1968           1966          15735
           0.0038        99.1313      0.0302051           1206           1934          15465
           0.0039        174.923      0.0310098           2177           1985          15877
           0.0039        132.714      0.0308223           2267           1975          15781
           0.0039        82.4067      0.0301465           1228           1930          15435
           0.0039        122.773      0.0323528           1755           2006          16047
           0.0039        254.766      0.0311806           3403           1962          15715
           0.0039        81.8998      0.0305664            933           1956          15650
           0.0039        119.003      0.0307344           1272           1965          15736
           0.0039        161.805      0.0301445           1893           1930          15434
           0.0039        203.387      0.0323789           2356           2074          16578
           0.0039        84.3088       0.029957           1615           1917          15338
           0.0039        197.997      0.0311895           2720           1996          15969
           0.0039        191.819      0.0309102           6143           1983          15826
           0.0039        131.237       0.030541           1915           1957          15637
           0.0039        245.986      0.0312715           2928           2002          16011
           0.0039        145.484      0.0309863           2955           1984          15865
           0.0039        87.8483       0.030707           1387           1965          15722
           0.0039        304.358      0.0322793           5226           2067          16527
           0.0039        152.306      0.0314067           2806           1978          15829
           0.0039        101.598      0.0313477           1731           2005          16050
           0.0039        132.911       0.031084           2095           1990          15915
            0.004        181.046      0.0312754           2793           2000          16013
            0.004        145.032      0.0313867           2097           2009          16070
            0.004         299.81      0.0321055           3332           2053          16438
            0.004        166.238      0.0303413           3329           1910          15292
            0.004        141.511      0.0314746           1531           2016          16115
            0.004        236.113      0.0327402           3023           2096          16763
            0.004        187.139      0.0320879           2818           2054          16429
            0.004        91.0578      0.0302754           1153           1939          15501
            0.004        280.817      0.0320742           4619           2053          16422
            0.004        353.423      0.0304023           4224           1945          15566
            0.004         131.21      0.0324345           1488           2041          16347
            0.004        123.587      0.0305754           2765           1927          15410
            0.004        290.814       0.032168           4696           2058          16470
            0.004        297.165      0.0306055           3261           1961          15670
            0.004        207.699      0.0311562           3047           1993          15952
            0.004        659.333      0.0301875           6205           1933          15456
            0.004        258.188      0.0317598           3421           2034          16261
            0.004        205.578      0.0327812           3486           2098          16784
            0.004        238.212      0.0315156           3154           2017          16136
            0.004        152.076      0.0311523           2856           1995          15950
];

rows = size(data, 1);
cols = size(data, 2);

data_delay = [];
for i = 1:rows/20,
   ifirst = (i - 1) * 20 + 1;
   ilast  = ifirst + 20 - 1;
   tmp = data(ifirst:ilast, cols-5+1);
   avg = mean(tmp);
   [h sig ci] = ttest(tmp, 0.1);
   ci = (ci(2)-ci(1))/2;
   data_delay = [data_delay; data(ifirst, 1:cols-5), avg ci];
end

figure(1);
hold on;
plot(data_delay(:,1), data_delay(:,2), symbol);

data_throughput = [];
for i = 1:rows/20,
   ifirst = (i - 1) * 20 + 1;
   ilast  = ifirst + 20 - 1;
   tmp = data(ifirst:ilast, cols-5+2);
   avg = mean(tmp);
   [h sig ci] = ttest(tmp, 0.1);
   ci = (ci(2)-ci(1))/2;
   data_throughput = [data_throughput; data(ifirst, 1:cols-5), avg ci];
end

figure(2);
hold on;
plot(data_throughput(:,1), data_throughput(:,2), symbol);

data_maxdelay = [];
for i = 1:rows/20,
   ifirst = (i - 1) * 20 + 1;
   ilast  = ifirst + 20 - 1;
   tmp = data(ifirst:ilast, cols-5+3);
   avg = mean(tmp);
   [h sig ci] = ttest(tmp, 0.1);
   ci = (ci(2)-ci(1))/2;
   data_maxdelay = [data_maxdelay; data(ifirst, 1:cols-5), avg ci];
end

figure(3);
hold on;
plot(data_maxdelay(:,1), data_maxdelay(:,2), symbol);


%-------- Saturation Analysis -----------
slope=[];
for i=2:size(data_throughput,1),
    slope(i-1) = (data_throughput(i,2)-data_throughput(i-1,2))/(data_throughput(i,1)-data_throughput(i-1,1));
end

for i=2:size(slope,2),
    if slope(i) < (0.95*mean(slope(1:i)))
        max_pir = data_throughput(i, 1);
        max_throughput = data_throughput(i, 2);
        min_delay = data_delay(i, 2);
        break;
    end
end
